package cn.itsource.service.impl;

import cn.itsource.AjaxResult;
import cn.itsource.domain.Store;
import cn.itsource.mapper.StoreMapper;
import cn.itsource.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class StoreServiceImpl implements StoreService {
    @Autowired
    private StoreMapper storeMapper;

    @Override
    @Transactional
    public AjaxResult add(Store store) {
        try {
            storeMapper.add(store);
            return new AjaxResult();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new AjaxResult(false,"操作失败");

    }
}
